Skip to content

refactor: replace mime-types library with minimal helper#549

Merged
FL4TLiN3 merged 2 commits intomainfrom
refactor/remove-mime-types
Feb 17, 2026
Merged

refactor: replace mime-types library with minimal helper#549
FL4TLiN3 merged 2 commits intomainfrom
refactor/remove-mime-types

Conversation

@FL4TLiN3
Copy link
Contributor

Summary

  • Remove mime-types (CJS) dependency that caused require("path") errors in ESM bundles
  • Add lightweight lookupMimeType helper in apps/base/src/lib/mime.ts covering the 6 used extensions
  • Update read-image-file.ts and read-pdf-file.ts to use the new helper
  • Remove mime-types and @types/mime-types from apps/base/package.json

Test plan

  • pnpm typecheck — 23/23 pass
  • pnpm build — 23/23 pass
  • pnpm test — all unit tests pass

🤖 Generated with Claude Code

FL4TLiN3 and others added 2 commits February 17, 2026 03:35
mime-types@3.0.2 (CJS) calls require("path") inside ESM bundles causing
runtime errors. Replace it with a lightweight lookupMimeType helper that
covers the six extensions actually used (.png, .jpg, .jpeg, .gif, .webp,
.pdf).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FL4TLiN3 FL4TLiN3 merged commit e9a58be into main Feb 17, 2026
11 checks passed
@FL4TLiN3 FL4TLiN3 deleted the refactor/remove-mime-types branch February 17, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant